package org.anderground.editor.gui.properties.station;

import org.anderground.core.Logger;
import org.anderground.core.model.Station;
import org.anderground.editor.edits.EditsManager;
import org.anderground.editor.edits.SetStationNameAction;

public class StationNameProperty extends AbstractStringStationProperty {

	@Override
	protected String getValue(Station station) {
		return station.getName();
	}

	@Override
	protected void setValue(Station station, String cellEditorValue) {
		Logger.i("new value: " + cellEditorValue);
		EditsManager.getInstance().performAction(
				new SetStationNameAction(station, cellEditorValue));

	}

	@Override
	public String getPropertyName() {
		return "Name";
	}

	@Override
	public boolean isEditable() {
		return true;
	}

}
